package com.easy.service.impl;

import com.easy.bean.Orderaddress;
import com.easy.dao.OrderaddressDao;
import com.easy.service.IOrderaddressService;
import com.easy.util.Page;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.Collections;
import java.util.List;
@Service
public class OrderaddressService implements IOrderaddressService {
    @Autowired
    OrderaddressDao orderaddressDao;

    @Override
    public int add(Orderaddress orderaddress) {
        return orderaddressDao.add(orderaddress);
    }

    @Override
    public int edit(Orderaddress orderaddress) {
        return orderaddressDao.edit(orderaddress);
    }

    @Override
    public int delete(int orderaddressid, int userid,int orderid) {
        return orderaddressDao.delete(orderaddressid, userid,orderid);
    }

    @Override
    public List<Orderaddress> getList(Page page, String text, int userid, int orderid) {
        return orderaddressDao.getList(page,text,userid,orderid);
    }


    @Override
    public Orderaddress getOrderaddressByID(int orderid) {
        return orderaddressDao.getOrderaddressByID(orderid);
    }

    @Override
    public int getCount(String text, int userid) {
        return orderaddressDao.getCount(text, userid);
    }

    @Override
    public Orderaddress getOrderaddress(Orderaddress orderaddress) {
        return orderaddressDao.getOrderaddress(orderaddress);
    }
}
